package ustc.xiaoyang.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import ustc.xiaoyang.mapper.EmpLogMapper;
import ustc.xiaoyang.pojo.EmpLog;
import ustc.xiaoyang.service.EmpLogService;

@Service
public class EmpLogServiceImpl implements EmpLogService {
    private final EmpLogMapper empLogMapper;
    public EmpLogServiceImpl(EmpLogMapper empLogMapper) {
        this.empLogMapper = empLogMapper;
    }
    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void add(EmpLog empLog) {
        empLogMapper.add(empLog);
    }
}
